$OpenBSD: patch-Makefile_in,v 1.38 2015/07/16 04:55:46 ajacoutot Exp $
--- Makefile.in.orig	Mon Jul 13 09:50:17 2015
+++ Makefile.in	Thu Jul 16 06:48:04 2015
@@ -4570,16 +4570,16 @@ cups_drv = prnt/drv/hpcups.drv
 @HPLIP_BUILD_TRUE@@SCAN_BUILD_TRUE@        scan/sane/soaphti.h scan/sane/soapi.h scan/sane/xml.c scan/sane/xml.h scan/sane/ledm.h scan/sane/ledmi.h scan/sane/ledm.c \
 @HPLIP_BUILD_TRUE@@SCAN_BUILD_TRUE@        scan/sane/bb_ledm.c scan/sane/http.h scan/sane/http.c scan/sane/sclpml.c scan/sane/sclpml.h common/utils.c common/utils.h
 
-@DARWIN_BUILD_FALSE@@HPLIP_BUILD_TRUE@@SCAN_BUILD_TRUE@libsane_hpaio_la_LDFLAGS = -version-info 1:0:0
+@DARWIN_BUILD_FALSE@@HPLIP_BUILD_TRUE@@SCAN_BUILD_TRUE@libsane_hpaio_la_LDFLAGS = -module -avoid-version
 @DARWIN_BUILD_TRUE@@HPLIP_BUILD_TRUE@@SCAN_BUILD_TRUE@libsane_hpaio_la_LDFLAGS = -module -framework CoreFoundation -version-info 1:0:0
 # The following is a interlibrary dependency that must be compiled first.
-@HPLIP_BUILD_TRUE@@SCAN_BUILD_TRUE@libsane_hpaio_la_LIBADD = libhpip.la libhpmud.la libhpipp.la $(DBUS_LIBS) -lcups -ldl
+@HPLIP_BUILD_TRUE@@SCAN_BUILD_TRUE@libsane_hpaio_la_LIBADD = libhpip.la libhpmud.la libhpipp.la $(DBUS_LIBS) -lcups
 #libsane_hpaio_la_CFLAGS = -DWITH_NONAMESPACES -DSOAP_DEBUG
 @HPLIP_BUILD_TRUE@@SCAN_BUILD_TRUE@libsane_hpaio_la_CFLAGS = $(DBUS_CFLAGS) -Iprotocol
 
 # hpmud library
 @HPLIP_BUILD_TRUE@MUDNAME = hpmud
-@HPLIP_BUILD_TRUE@@LIBUSB01_BUILD_FALSE@libhpmud_la_CFLAGS = -I/usr/include/libusb-1.0 -DMUDNAME=\"$(MUDNAME)\" -DCONFDIR=\"$(hplip_confdir)\"
+@HPLIP_BUILD_TRUE@@LIBUSB01_BUILD_FALSE@libhpmud_la_CFLAGS = -I${LOCALBASE}/include/libusb-1.0 -DMUDNAME=\"$(MUDNAME)\" -DCONFDIR=\"$(hplip_confdir)\"
 @HPLIP_BUILD_TRUE@@LIBUSB01_BUILD_TRUE@libhpmud_la_CFLAGS = -DMUDNAME=\"$(MUDNAME)\" -DCONFDIR=\"$(hplip_confdir)\"
 @HPLIP_BUILD_TRUE@@LIBUSB01_BUILD_FALSE@libhpmud_la_SOURCES = io/hpmud/hpmud.c io/hpmud/mlc.c io/hpmud/model.c io/hpmud/pml.c \
 @HPLIP_BUILD_TRUE@@LIBUSB01_BUILD_FALSE@	  io/hpmud/hpmud.h io/hpmud/hpmudi.h io/hpmud/list.h io/hpmud/mlc.h io/hpmud/pml.h io/hpmud/dot4.c \
@@ -4592,7 +4592,7 @@ cups_drv = prnt/drv/hpcups.drv
 @HPLIP_BUILD_TRUE@@LIBUSB01_BUILD_TRUE@	  common/utils.c common/utils.h
 
 @HPLIP_BUILD_TRUE@libhpmud_la_LDFLAGS = -version-info 0:6:0 -lpthread \
-@HPLIP_BUILD_TRUE@	-ldl $(am__append_2) $(am__append_3) \
+@HPLIP_BUILD_TRUE@	$(am__append_2) $(am__append_3) \
 @HPLIP_BUILD_TRUE@	$(am__append_4)
 @HPLIP_BUILD_TRUE@libhpip_la_LDFLAGS = -version-info 0:1:0
 @HPLIP_BUILD_TRUE@libhpip_la_LIBADD = -lm
@@ -4622,7 +4622,7 @@ cups_drv = prnt/drv/hpcups.drv
 @HPLIP_BUILD_TRUE@pstotiff_SCRIPTS = fax/filters/pstotiff
 
 # hplip.state
-@HPLIP_BUILD_TRUE@hplip_statedir = /var/lib/hp
+@HPLIP_BUILD_TRUE@hplip_statedir = /var/db/hp
 @HPLIP_BUILD_TRUE@dist_hplip_state_DATA = 
 @FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@dist_hplip_SCRIPTS = hpssd.py __init__.py hpdio.py
 @FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@cmddir = $(hplipdir)
@@ -4754,7 +4754,7 @@ cups_drv = prnt/drv/hpcups.drv
 @FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@hpmudext_la_LDFLAGS = -module -avoid-version
 @FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@hpmudext_la_SOURCES = io/mudext/hpmudext.c
 @FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@hpmudext_la_LIBADD = libhpmud.la
-@FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@@LIBUSB01_BUILD_FALSE@hpmudext_la_CFLAGS = -I/usr/include/libusb-1.0 -I$(PYTHONINCLUDEDIR)
+@FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@@LIBUSB01_BUILD_FALSE@hpmudext_la_CFLAGS = -I${LOCALBASE}/include/libusb-1.0 -I$(PYTHONINCLUDEDIR)
 @FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@@LIBUSB01_BUILD_TRUE@hpmudext_la_CFLAGS = -I$(PYTHONINCLUDEDIR)
 
 # ui (qt3)
@@ -4806,7 +4806,7 @@ cups_drv = prnt/drv/hpcups.drv
 @FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@hppgsz_SOURCES = prnt/hpijs/PrinterProperties.cpp prnt/hpijs/PrinterProperties.h prnt/hpijs/bug.h
 @FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@hppgsz_CXXFLAGS = $(libapdk_la_CXXFLAGS)
 @FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@hppgsz_CFLAGS = $(libapdk_la_CFLAGS)
-@FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@hppgsz_LDADD = libapdk.la -ljpeg -ldl
+@FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@hppgsz_LDADD = libapdk.la -ljpeg
 
 # hplip.desktop
 @FULL_BUILD_TRUE@@GUI_BUILD_TRUE@@HPLIP_BUILD_TRUE@hplip_desktopdir = $(icondir)
@@ -4871,8 +4871,8 @@ libapdk_la_CFLAGS = $(libapdk_la_CXXFLAGS) -Iprnt/hpij
 
 @HPIJS_INSTALL_TRUE@hpijs_CXXFLAGS = $(libapdk_la_CXXFLAGS)
 @HPIJS_INSTALL_TRUE@hpijs_CFLAGS = $(libapdk_la_CFLAGS)
-@HPIJS_INSTALL_TRUE@@HPLIP_BUILD_FALSE@hpijs_LDADD = libapdk.la -ljpeg -ldl
-@HPIJS_INSTALL_TRUE@@HPLIP_BUILD_TRUE@hpijs_LDADD = libapdk.la -ljpeg -ldl libhpip.la libhpmud.la $(DBUS_LIBS)
+@HPIJS_INSTALL_TRUE@@HPLIP_BUILD_FALSE@hpijs_LDADD = libapdk.la -ljpeg
+@HPIJS_INSTALL_TRUE@@HPLIP_BUILD_TRUE@hpijs_LDADD = libapdk.la -ljpeg libhpip.la libhpmud.la $(DBUS_LIBS)
 
 # hpcups
 #if NEW_HPCUPS
@@ -4912,7 +4912,7 @@ libapdk_la_CFLAGS = $(libapdk_la_CXXFLAGS) -Iprnt/hpij
 @HPCUPS_INSTALL_TRUE@	common/utils.c common/utils.h
 
 @HPCUPS_INSTALL_TRUE@hpcups_CXXFLAGS = $(APDK_ENDIAN_FLAG) $(DBUS_CFLAGS)
-@HPCUPS_INSTALL_TRUE@hpcups_LDADD = -ljpeg -ldl -lcups -lcupsimage $(DBUS_LIBS)
+@HPCUPS_INSTALL_TRUE@hpcups_LDADD = -ljpeg -lcups -lcupsimage $(DBUS_LIBS)
 
 #else
 #hpcupsdir = $(cupsfilterdir)
@@ -4921,15 +4921,15 @@ libapdk_la_CFLAGS = $(libapdk_la_CXXFLAGS) -Iprnt/hpij
 #hpcups_CXXFLAGS = $(libapdk_la_CXXFLAGS)
 #hpcups_CFLAGS = $(libapdk_la_CFLAGS)
 #if HPCUPS_ONLY_BUILD
-#hpcups_LDADD = libapdk.la -ljpeg -ldl -lcups -lcupsimage
+#hpcups_LDADD = libapdk.la -ljpeg -lcups -lcupsimage
 #else
-#hpcups_LDADD = libapdk.la -ljpeg -ldl libhpip.la libhpmud.la $(DBUS_LIBS) -lcups -lcupsimage
+#hpcups_LDADD = libapdk.la -ljpeg libhpip.la libhpmud.la $(DBUS_LIBS) -lcups -lcupsimage
 #endif #HPCUPS_ONLY_BUILD
 #endif # NEW_HPCUPS
 # hpcupsfax
 @FAX_BUILD_TRUE@@HPCUPS_INSTALL_TRUE@@HPCUPS_ONLY_BUILD_FALSE@hpcupsfaxdir = $(cupsfilterdir)
 @FAX_BUILD_TRUE@@HPCUPS_INSTALL_TRUE@@HPCUPS_ONLY_BUILD_FALSE@hpcupsfax_SOURCES = prnt/hpijs/hpcupsfax.cpp prnt/hpijs/hpcupsfax.h common/utils.h common/utils.c
-@FAX_BUILD_TRUE@@HPCUPS_INSTALL_TRUE@@HPCUPS_ONLY_BUILD_FALSE@hpcupsfax_LDADD = libhpip.la -lcups -lcupsimage -ldl
+@FAX_BUILD_TRUE@@HPCUPS_INSTALL_TRUE@@HPCUPS_ONLY_BUILD_FALSE@hpcupsfax_LDADD = libhpip.la -lcups -lcupsimage
 
 # PPDs
 ppddir = $(hpppddir)
